home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Jotto ][ 1.2 / source / Shell ƒ / generic open.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  921 b   |  42 lines  |  [TEXT/MMCC]

  1. #include "program globals.h"
  2. #include "generic open.h"
  3. #include "jotto load-save.h"
  4. #include "environment.h"
  5. #include "dialogs.h"
  6. #include "error.h"
  7. #include "print meat.h"
  8. #include "file utilities.h"
  9. #include "graphics.h"
  10. #include "window layer.h"
  11.  
  12. void OpenTheFile(FSSpec *myFSS)
  13. {
  14.     switch (GetFileType(myFSS))
  15.     {
  16.         case SAVE_TYPE:
  17.             if (!IndWindowExistsQQ(kMainWindow))
  18.             {
  19.                 LoadSaveDispatch(TRUE, TRUE, myFSS);
  20.                 gNeedToOpenWindow=FALSE;
  21.             }
  22.             else
  23.             {
  24.                 RemoveHilitePatch();
  25.                 PositionDialog('ALRT', smallAlert);
  26.                 ParamText("\pPlease close the current game before opening another.","\p","\p","\p");
  27.                 StopAlert(smallAlert, 0L);
  28.                 InstallHilitePatch();
  29.             }
  30.             break;
  31.     }
  32. }
  33.  
  34. void PrintTheFile(FSSpec *myFSS)
  35. {
  36.     RemoveHilitePatch();
  37.     PositionDialog('ALRT', smallAlert);
  38.     ParamText("\pJotto ][ can not print games or documents.","\p","\p","\p");
  39.     StopAlert(smallAlert, 0L);
  40.     InstallHilitePatch();
  41. }
  42.